<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="./include/js/jquery.js" charset="utf-8"></script>
<script type="text/javascript" src="./include/js/form-validation.js" charset="utf-8"></script>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<TITLE>CSU_ACM比赛报名系统</TITLE> 
<LINK rel="stylesheet" type="text/css" href="css/style.css">
</HEAD>
<!--<h1>CSU_ACM比赛报名系统</h1>-->
<?php
require_once("./include/bm_config.php");
require_once("./include/funcs.php");
require_once('./include/db_info.inc.php');
?>
<body>
<div id="container">
<DIV class="outer sp-inner">
    <DIV class="sp bg-box-a">
        <DIV id="header" class="row sp">
            <UL id="nav" class="list-init">
            	<LI id="bbs_tab"><A class="text-tab" title="BBS" href="http://bbs.csu.edu.cn/bbs/forum.php?mod=forumdisplay&action=list&fid=317#groupnav" target="_blank">BBS</A></LI>
              	<LI id="home_tab"><A class="text-tab" title="Home" href="<?=$BM_HOME?>">Home</A></LI>
              	<LI id="home_tab"><A class="text-tab" title="MyContests" href="took_part_in.php" target="_blank">MyContests</A></LI>
              	<LI id="home_tab"><A class="text-tab" title="OnlineJudge" href="<?=$OJ_HOME?>" target="_blank">COJ</A></LI> 			
              	<?php		
								if (isset($_SESSION['user_id']))
								{
									$sid=$_SESSION['user_id'];
									echo "<LI id='update_tab'><A class='text-tab' title='Update' href='./modifypage.php'>UpdateInfo</A></LI>";					
									echo "<LI><A class='text-tab' title='Logout' href='./logout.php'>LogOut</A></LI>";	
									if (isset($_SESSION['administrator']) || isset($_SESSION[$BM_ADMIN]))
										echo "<LI><A class='text-tab' title='Admin' href='./admin'>Admin</A></LI>";
									echo "<LI class='username'> <a title='User'  href='./$OJ_PATH/userinfo.php?user=$sid'>".$sid."</a></li>";	
								}
								else
								{
									echo "<LI id='login_tab'><A class='text-tab' title='Login' href='./loginpage.php'>Login</A></LI>";
									echo "<LI id='register_tab'><A class='text-tab' title='Register' href='./registerpage.php'>Register</A></LI>";								
								}
								?> 
            </UL>
        </DIV>
        <DIV id="pic-area" class="row"> <H2 id="oj_banner" class="hide">About</H2></DIV>
    </DIV>
</DIV>
<DIV id="main" class="row">
<?php
//Message
$fp=fopen("admin/msg.txt","r");
$msg="";
while (!feof($fp))
{
	$strtmp=fgets($fp);
	$msg=$msg.$strtmp;
}
if (strlen($msg)>5)
{
	echo "<marquee scrollamount=3 behavior=ALTERNATE scrolldelay=150>";
	echo "<div class='message'>";
	echo $msg;
	echo "</div>";
	echo "</marquee>";
}
?>